//package com.example.financechain.controller;
//
//
////import com.example.financechain.Utils.QueryBlockHeightAndLatestBlock;
//import com.example.financechain.domain.BlockInfomation;
//import com.example.financechain.service.IBlockService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//
//import java.io.IOException;
//import java.security.InvalidKeyException;
//import java.security.cert.CertificateException;
//import java.util.List;
//
//@RestController
//@RequestMapping("/private/blockexplore")
//@Slf4j
//public class BlockController {
//
//
////    @Autowired
////    QueryBlockHeightAndLatestBlock query;
//
//    @Autowired
//    IBlockService blockService;
//
//    /**
//     * 根据区块号查询区块
//     * @param number
//     * @return
//     * @throws CertificateException
//     * @throws IOException
//     * @throws InvalidKeyException
//     */
//    @GetMapping("block/{number}")
//    public BlockInfomation querblocklist(@PathVariable("number") Integer number) throws CertificateException, IOException, InvalidKeyException {
//        return blockService.queryBlockinfo(number);
//    }
//
//    /**
//     * 查询区块高度
//     * @return
//     */
//    @GetMapping("height")
//    public Long queryHeight(){
//        return blockService.queryheight();
//    }
//
//    /**
//     * 根据区块号查询区块详情
//     * @param number
//     * @return
//     */
//    @GetMapping("block/detail/{number}")
//    public List<String> querBlockDetail(@PathVariable("number") Integer number){
//        return blockService.querDetail(number);
//    }
//
//    /**
//     * 查询区块详情
//     * @param transcationID
//     * @return
//     */
//    @GetMapping("block/detail")
//    public List<String> queryDetailbyTXID(@RequestParam(value = "transcationID",required = true)String transcationID){
//
//        return blockService.querDetailbyTXID(transcationID);
//    }
//
//
//
//}
